home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / greek.g < prev    next >
Text File  |  1995-05-04  |  7KB  |  323 lines

  1. (game-module "greek"
  2.   (blurb "Classical Greece, 500-350 BC")
  3.   (variants
  4.    (world-seen true)
  5.    (see-all false)
  6.    (world-size)
  7.    ("Keep Score" keep-score
  8.      (true (scorekeeper (do last-side-wins))))
  9.    )
  10.   )
  11.  
  12. (unit-type peltast
  13.   (help "light fast infantry"))
  14. (unit-type hoplite
  15.   (help "heavy destructive infantry"))
  16. (unit-type archer
  17.   (help "archers and slingers"))
  18. (unit-type cavalry
  19.   (help "more like light cavalry"))
  20. (unit-type trireme (char "T")
  21.   (help "three-decked ship - mainstay of the navies"))
  22. (unit-type |siege engine| (image-name "catapult") (char "S")
  23.   (help "bashes cities (slowly)"))
  24. (unit-type fortifications
  25.   (help "augments a polis' defense"))
  26. (unit-type polis (image-name "walltown") (char "*")
  27.   (help "typical city-state"))
  28. (unit-type metropolis (image-name "parthenon") (char "@")
  29.   (help "a large and powerful city"))
  30.  
  31. (define p peltast)
  32. (define h hoplite)
  33. (define a archer)
  34. (define c cavalry)
  35. (define T trireme)
  36. (define S |siege engine|)
  37. (define / fortifications)
  38. (define * polis)
  39. (define @ metropolis)
  40.  
  41. (add / image-name "camp")
  42.  
  43. (material-type food
  44.   (help "everybody needs food to survive"))
  45. (material-type talents
  46.   (help "the unit of big money"))
  47.  
  48. (terrain-type sea (color "sky blue") (char "."))
  49. (terrain-type plains (color "green") (char "+"))
  50. (terrain-type forest (color "forest green") (char "%"))
  51. (terrain-type desert (color "yellow") (char "~"))
  52. (terrain-type mountains (color "sienna") (char "^"))
  53. (terrain-type river (color "blue") (char "-")
  54.   (subtype border))
  55.  
  56. (define cities (* @))
  57. (define places (/ * @))
  58. (define ship-u* (trireme))
  59. (define land-u* (p h a c S))
  60. (define movers (p h a c T S))
  61.  
  62. (define water (sea river))
  63. (define land (plains forest desert mountains))
  64.  
  65. ;;; Static relationships.
  66.  
  67. (table vanishes-on
  68.   (land-u* water true)
  69.   (places water true)
  70.   (ship-u* land true)
  71.   )
  72.  
  73. (add t* capacity 4)
  74.  
  75. (table unit-size-in-terrain
  76.   (u* t* 1) ; isn't this the default?
  77.   )
  78.  
  79. ;; Cities and ships have relatively limited capacity.
  80.  
  81. (add u* capacity 0)
  82.  
  83. (add cities capacity 8)
  84.  
  85. (add trireme capacity 4)
  86.  
  87. (table unit-size-as-occupant
  88.   (u* u* 99)
  89.   ((p h a c) trireme (2 2 1 4))
  90.   (movers cities 1)
  91.   )
  92.  
  93. ;(table unit-capacity-x
  94. ;  (cities / 4)
  95. ;  )
  96.  
  97. ;;; Unit-material capacities.
  98.  
  99. (table unit-storage-x
  100.   (u* food (2 2 2 2 100 0 100 100 100))
  101.   (u* talents (0 0 0 0 120 0 1000 3000 9000))
  102.   )
  103.  
  104. ;;; Vision.
  105.  
  106. ;; A month's time is sufficient for news about cities
  107. ;; to get around everywhere.
  108.  
  109. (add cities see-always true)
  110.  
  111. ;;; Actions.
  112.  
  113. ;; A turn is a whole month, so lots can happen.
  114.  
  115. (add u* acp-per-turn (16 12 16 32 24 4 0 1 1))
  116.  
  117. ;;; Movement.
  118.  
  119. (add places speed 0)
  120.  
  121. (table mp-to-enter-terrain
  122.   (land-u* water 99)
  123.   (land-u* mountains 2)
  124.   (ship-u* land 99)
  125.   )
  126.  
  127. ;;; Construction.
  128.  
  129. (add u* cp (20 20 3 12 6 12 1 1 1))
  130.  
  131. (table acp-to-create
  132.   (* movers 1)
  133.   (@ movers 1)
  134.   )
  135.  
  136. (table cp-on-creation
  137.   (* movers 1)
  138.   (@ movers 1)
  139.   )
  140.  
  141. (table acp-to-build
  142.   (* movers 1)
  143.   (@ movers 1)
  144.   )
  145.  
  146. (table cp-per-build
  147.   (* movers 1)
  148.   (@ movers 1)
  149.   )
  150.  
  151. ;; Production.
  152.  
  153. (table base-production
  154.   ((p h a c) food 1)
  155.   (cities food 10)
  156.   )
  157.  
  158. (table productivity
  159.   (u* (desert mountains) 0)
  160.   )
  161.  
  162. (table base-consumption
  163.   ((p h a c) food 1)
  164.   (cities food 10)
  165.   )
  166.  
  167. (table hp-per-starve
  168.   ((p h) food 10)
  169.   ((a c) food 1)
  170.   (cities food 4)
  171.   )
  172.  
  173. ;;; Combat.
  174.  
  175. ;;               p  h  a  c  T  S  /  *  @
  176. (add u* hp-max (20 20  1  1 10  2 10 20 40))
  177.  
  178. (table acp-to-attack
  179.   (u* u* 8)
  180.   )
  181.  
  182. (table hit-chance
  183. ;;        p  h  a  c  T  S  /  *  @
  184.   (p u* (40 20 50 40 10 30 10  0  0))
  185.   (h u* (60 40 50 50 70 50 70 20 10))
  186.   (a u* (50 20 30 30 60 30  0  0  0))
  187.   (c u* (60 30 50 50 50 60 50  0  0))
  188.   (T u* ( 0  0  0  0  0 30  0  0  0))
  189.   (S u* ( 0  0  0  0  0  5 99 99 99))
  190.   (/ u* ( 0  0  0  0 20  0  0  0  0))
  191.   (* u* ( 0 40  0  0  0 10  0  0  0))
  192.   (@ u* ( 0 80  0  0  0 20  0  0  0))
  193.   )
  194.  
  195. (table damage
  196.   (u* u* 1)
  197.   (h u* 2)
  198.   (S cities 4)
  199.   )
  200.  
  201. (table capture-chance
  202.   ;; Only hoplites can capture anything.
  203.   (h S 50)
  204.   (h * 10)
  205.   (h @ 5)
  206.   )
  207.  
  208. ;;; Backdrop.
  209.  
  210. ;; 1000 c attrition
  211.  
  212. ;; The mere presence of a hoplite army might cause the city
  213. ;; to change sides.
  214.  
  215. (table surrender-chance
  216.   (cities h (10 5))
  217.   )
  218.  
  219. (table surrender-range
  220.   (cities h 1)
  221.   )
  222.  
  223. ;;; Random generation.
  224.  
  225. (set alt-blob-density 10000)
  226. (set alt-blob-size 40)
  227. (set alt-smoothing 1)
  228. (set wet-blob-density 2000)
  229. (set wet-blob-size 100)
  230.  
  231. (add t* alt-percentile-min (  0  70  70  70  90 0))
  232. (add t* alt-percentile-max ( 70  90  90  90 100 0))
  233. (add t* wet-percentile-min (  0  20  80   0   0 0))
  234. (add t* wet-percentile-max (100  80 100  20 100 0))
  235.  
  236. (set edge-terrain sea) ; the river Oceanus
  237.  
  238. (add @ start-with 1)
  239. (add h start-with 1)
  240. (add T start-with 1)
  241. (add * independent-near-start 3)
  242. ;; Try to get countries on the coast.
  243. (add (sea plains) country-terrain-min (1 1))
  244.  
  245. (table independent-density
  246.   (* (plains desert) (100 50)))
  247.  
  248. (table favored-terrain
  249.   (u* t* 100)
  250.   (u* sea 0)
  251.   (ship-u* sea 100)
  252.   )
  253.  
  254. ;;; (should set up a BC calendar)
  255.  
  256. (world 2500 (year-length 12))  ; big world, can't circumnavigate.
  257.  
  258. ;;; An assortment of city-states.  The famous ones are weighted more heavily.
  259.  
  260. (set side-library '(
  261.   (10 (name "Athens") (adjective "Athenian"))
  262.   (10 (name "Sparta") (adjective "Spartan"))
  263.   (5 (name "Corinth") (adjective "Corinthian"))
  264.   (5 (name "Thebes") (adjective "Theban"))
  265.   (3 (name "Argos") (adjective "Argive"))
  266.   (2 (name "Megara") (adjective "Megaran"))
  267.   (2 (name "Miletus") (adjective "Miletan"))
  268.   (2 (name "Messene") (adjective "Messenian"))
  269.   (2 (name "Syracuse") (adjective "Syracusan"))
  270.   (2 (name "Ephesus") (adjective "Ephesian"))
  271.   (2 (name "Delos") (adjective "Delian"))
  272.   ((name "Lemnos") (adjective "Lemnian"))
  273.   ((name "Ambracia") (adjective "Ambraciot"))
  274.   ((name "Phokia") (adjective "Phokian"))
  275.   ((name "Chios") (adjective "Chian"))
  276.   ((name "Gelos") (adjective "Geloan"))
  277.   ((name "Caria") (adjective "Carian"))
  278.   ((name "Lokria") (adjective "Lokrian"))
  279.   ((name "Melos") (adjective "Melian"))
  280.   ((name "Phlias") (adjective "Phliasian"))
  281.   ((name "Samos") (adjective "Samian"))
  282.   ((name "Thuria") (adjective "Thurian"))
  283.   ((name "Tegea") (adjective "Tegean"))
  284.   ((name "Dolope") (adjective "Dolopian"))
  285.   ((name "Olynthia") (adjective "Olynthian"))
  286.   ((name "Elis") (adjective "Elean"))
  287.   ((name "Lucania") (adjective "Lucanian"))
  288.   ((name "Kythera") (adjective "Kytheran"))
  289.   ((name "Skios") (adjective "Skionian"))
  290. ))
  291.  
  292. (game-module (notes (
  293.   "This time strictly covers about 500 to 350 B.C.  Land warfare"
  294.   "was most significant, with some notable sea-fights.  Cities were nearly"
  295.   "untakeable, so the action centered around sieges and field battles."
  296.   ""
  297.   "The numbers border on the plausible, but again this one has not been"
  298.   "played enough to find the imbalances even, let alone decide on good"
  299.   "strategies."
  300. )))
  301.  
  302. (add peltast notes
  303.   "Useful in skirmishes."
  304.   )
  305. (add hoplite notes
  306.   "Hoplite (heavy infantry).  For the capture of cities by assault."
  307.   )
  308. (add archer notes
  309.   "???"
  310.   )
  311. (add cavalry notes
  312.   "Fast, but ineffective against cities."
  313.   )
  314. (add trireme notes
  315.   "Use this for everything naval."
  316.   )
  317.  
  318. ;;; Should add variable loyalties.
  319.  
  320. (game-module (design-notes (
  321.   "Time scale is one month."
  322.   )))
  323.